Skip to content

Update Cookbook docs: rename rustapi to rustapi-rs and add jobs learning path#86

Merged
Tuntii merged 4 commits intomainfrom
docs-update-cookbook-rustapi-rs-12846515349818711293
Feb 4, 2026
Merged

Update Cookbook docs: rename rustapi to rustapi-rs and add jobs learning path#86
Tuntii merged 4 commits intomainfrom
docs-update-cookbook-rustapi-rs-12846515349818711293

Conversation

@Tuntii
Copy link
Owner

@Tuntii Tuntii commented Feb 4, 2026

This PR updates the RustAPI Cookbook documentation to ensure consistency with the current codebase version (0.1.275) and package naming conventions.

Key changes:

  1. Package Renaming: Fixed multiple occurrences where the crate was referred to as rustapi instead of the correct rustapi-rs (in Cargo.toml dependencies) and rustapi_rs (in Rust imports). This affected recipes for file uploads, database integration, websockets, and handler concepts.
  2. Learning Path Enhancement: Added a new "Background Tasks" section to the Learning Path in docs/cookbook/src/learning/README.md, guiding users to the rustapi-jobs crate for async processing in Microservices and Enterprise architectures.
  3. Version Synchronization: Ensured that the updated documentation files reflect the current workspace version 0.1.275.

PR created automatically by Jules for task 12846515349818711293 started by @Tuntii

…ance learning path

- Updated `docs/cookbook/src/learning/README.md` to include `rustapi-jobs` in the Learning Path (Microservices & Enterprise).
- Updated `docs/cookbook/src/recipes/file_uploads.md` to use `rustapi-rs` dependency and imports.
- Updated `docs/cookbook/src/recipes/db_integration.md` to use `rustapi_rs` imports.
- Updated `docs/cookbook/src/recipes/websockets.md` to use `rustapi_rs` imports.
- Updated `docs/cookbook/src/concepts/handlers.md` to use `rustapi_rs` imports.
- Ensured consistency of version `0.1.275` across updated files.

Co-authored-by: Tuntii <121901995+Tuntii@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copilot AI review requested due to automatic review settings February 4, 2026 03:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the RustAPI Cookbook documentation to align crate naming (rustapi-rs / rustapi_rs) with the current codebase and expands the Learning Path to include background job processing guidance.

Changes:

  • Renames Rust imports from rustapi::... to rustapi_rs::... in multiple cookbook pages.
  • Updates a Cargo.toml snippet to use rustapi-rs (and adds rustapi-jobs pointers in the Learning Path).
  • Extends the Learning Path with “Background Tasks/Jobs” and references to rustapi-jobs.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
docs/cookbook/src/recipes/websockets.md Updates import to rustapi_rs::prelude::* for WebSockets recipe.
docs/cookbook/src/recipes/file_uploads.md Renames dependency/import paths to rustapi-rs / rustapi_rs.
docs/cookbook/src/recipes/db_integration.md Updates import to rustapi_rs::prelude::* for DB recipe.
docs/cookbook/src/learning/README.md Adds background tasks/jobs guidance and rustapi-jobs links.
docs/cookbook/src/concepts/handlers.md Updates handler concept example import to rustapi_rs::prelude::*.
Comments suppressed due to low confidence (1)

docs/cookbook/src/recipes/file_uploads.md:66

  • DefaultBodyLimit is not defined in the RustAPI crates (it looks like an Axum type). In RustAPI, request size limits are configured via RustApi::body_limit(...) (or by adding rustapi_core::middleware::BodyLimitLayer). Update this snippet to use the framework’s actual body limit API so the example compiles and matches runtime behavior.
use rustapi_rs::extract::DefaultBodyLimit;

let app = RustApi::new()
    .route("/upload", post(upload_file))
    // Limit request body to 10MB
    .layer(DefaultBodyLimit::max(10 * 1024 * 1024));

Comment on lines +19 to 21
use rustapi_rs::prelude::*;
use rustapi_rs::extract::Multipart;
use tokio::fs::File;
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rustapi_rs::extract::Multipart does not appear to exist in this codebase (there is no extract module exported by rustapi-rs). Multipart is already available from rustapi_rs::prelude::* (or via rustapi_rs::Multipart). Update the import to a valid path or drop it entirely to avoid a non-compiling example.

Copilot uses AI. Check for mistakes.
Comment on lines 19 to 21
use rustapi_ws::{WebSocket, WebSocketUpgrade, Message};
use rustapi::prelude::*;
use rustapi_rs::prelude::*;
use std::sync::Arc;
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example now imports rustapi_rs::prelude::*, but the dependency snippet only includes rustapi-ws (and not rustapi-rs). As written, users won’t be able to compile RustApi::new(), routing helpers like get, or the rustapi_rs import. Consider switching to the supported pattern: depend on rustapi-rs with features = ["ws"] and import WebSocket types via rustapi_rs::ws::{...} (or ensure both crates are listed explicitly).

Copilot uses AI. Check for mistakes.
Comment on lines 61 to 64
```rust
use rustapi::prelude::*;
use rustapi_rs::prelude::*;

#[derive(Deserialize)]
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dependencies list in this recipe does not include rustapi-rs, but the code sample imports rustapi_rs::prelude::* and uses RustApi/routing helpers. Add rustapi-rs = "0.1.275" (and any needed feature flags) to the Dependencies section so the example is copy/pasteable and compiles.

Copilot uses AI. Check for mistakes.
Tuntii and others added 3 commits February 4, 2026 18:04
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Tuntii Tuntii merged commit 2b57c43 into main Feb 4, 2026
github-actions bot pushed a commit that referenced this pull request Feb 4, 2026
…e-cookbook-rustapi-rs-12846515349818711293

Update Cookbook docs: rename rustapi to rustapi-rs and add jobs learning path 2b57c43
@Tuntii Tuntii deleted the docs-update-cookbook-rustapi-rs-12846515349818711293 branch February 4, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant